<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
      //属性名和变量名相同，可以简写

      let name='Lisa'
      let city="beijing"
      let person={
       name, // name:name,
       city, // city:city
      //  sayHello:function(){
      //    console.log('hello judy');
      //  }
       sayHello(){
         console.log('hello judy');
       }
      }
      console.log(person);
      person.sayHello()
      
      //方法可以省略function 关键字
     
      

    </script>
</body>
</html>